home *** CD-ROM | disk | FTP | other *** search
- /*
- File: ScriptUtils.h
-
- Contains: Script handling & OSA interface
-
- Utilities derived from various DTS example source code.
-
- */
-
-
- #ifndef __SCRIPTUTILS__
- #define __SCRIPTUTILS__
-
-
- #ifndef __APPLEEVENTS__
- #include "AppleEvents.h"
- #endif
-
- #ifndef __PASCALSTRING__
- #include <PascalString.h>
- #endif
-
- #ifndef __AERegistry__
- #include <AERegistry.h>
- #endif
-
- #ifndef __OSA__
- #include <OSA.h>
- #endif
-
-
- #define kEndOfList NULL // Nil terminator for variable argument list.
-
- /**-----------------------------------------------------------------------
- Utility Routines for getting data from AEDesc's
- -----------------------------------------------------------------------**/
-
- pascal void GetRawDataFromDescriptor(const AEDesc *theDesc,
- Ptr destPtr,
- Size destMaxSize,
- Size *actSize);
-
- pascal OSErr GetDescTypeFromDescriptor(const AEDesc *sourceDesc, DescType *result);
-
- pascal OSErr GetPStringFromDescriptor(const AEDesc *sourceDesc, char *resultStr);
-
- pascal OSErr GetIntegerFromDescriptor(const AEDesc *sourceDesc, short *result);
-
- pascal OSErr GetBooleanFromDescriptor(const AEDesc *sourceDesc, Boolean *result);
-
- pascal OSErr GetLongIntFromDescriptor(const AEDesc *sourceDesc, long *result);
-
- pascal OSErr GetRectFromDescriptor(const AEDesc *sourceDesc, Rect *result);
-
- pascal OSErr GetPointFromDescriptor(const AEDesc *sourceDesc, Point *result);
-
- pascal OSErr GetCStringFromDescriptor(const AEDesc *sourceDesc, CStr255 *resultStr);
-
-
- OSErr MakeNullDesc(AEDesc *dataDesc);
-
- OSErr MakeNameDesc(CStr255& theString, AEDesc *dataDesc);
-
- OSErr MakeLongIntDesc(long theIndex, AEDesc *dataDesc);
-
-
-
- pascal WindowPtr WindowNameToWindowPtr(StringPtr nameStr);
-
- pascal WindowPtr GetWindowPtrOfNthWindow(short index);
-
- pascal short CountWindows(void);
-
-
- pascal OSErr FindApplicationOnVolume(OSType whatSig, short theVol, FSSpec *foundSpec);
-
- void InitAEDescs(AEDesc* desc1, ... ); // Null terminated argument list.
- void DisposeAEDescs(AEDesc* desc1, ... ); // Null terminated argument list.
-
-
- #endif
-